package com.shaokel.service;

import com.shaokel.pojo.Blog;
import com.shaokel.pojo.vo.BlogQuery;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * @author 少丶客
 * @ClassName BlogService
 * @Description TODO
 * @Date 2020/6/26 14:41
 * @Vesion 1.0
 */
public interface BlogService {

    //增
    Blog saveBlog(Blog blog);

    //删
    void deleteBlog(Long id);

    //改
    Blog updateBlog(Long id,Blog blog);

    //查
    Blog getBlog(Long id);

    //分页查询
    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);

    Page<Blog> listBlog(Pageable pageable);

    List<Blog> listRecommendBlogTop(Integer size);

    Page<Blog> listBlog(String query, Pageable pageable);

    Blog getAndConvert(Long id);

    Page<Blog> listBlog(Long tagId, Pageable pageable);

    Map<String,List<Blog>> archiveBlog();

    Long countBlog();

}